package net.xinqushi.design.COR.impl;

import net.xinqushi.design.COR.ConsumeHandler;

public class DeptHandler extends ConsumeHandler {

    @Override
    public void doHandler(String user, double free) {

        //1000 找部门经理
        if(free < 1000){
            if(user.equals("xjie")){
                System.out.println("Dept给予报销:" + free);
            }else{
                System.out.println("Dept got out");
            }
            return;
        }

        //1000 以上找Boss
        if(getNextHandler() != null)
            getNextHandler().doHandler(user,free);
    }
}
